package com.xlyy.modbus.controller;

import com.xlyy.modbus.entity.MyHeadinfo;
import com.xlyy.modbus.service.IMyHeadinfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.stereotype.Controller;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author zhoucanji
 * @since 2024-05-15
 */
@RestController
@RequestMapping("/myHeadinfo")
public class MyHeadinfoController {
    @Autowired
    IMyHeadinfoService myHeadinfoService;

    @GetMapping("/getMyHeadinfoById")
    public MyHeadinfo getMyHeadinfoById(){
        return myHeadinfoService.getMyHeadinfoById();
    }

    @PostMapping("/saveupdate")
    public boolean saveupdateMyHeadinfo(@RequestBody MyHeadinfo myHeadinfo){
        return myHeadinfoService.saveupdateMyHeadinfo(myHeadinfo);
    }

}
